package com.itheima.jdk8date;

import com.itheima.test.Haha;

import java.time.Duration;
import java.time.LocalDateTime;

/*
Duration
 */
public class Demo09 {

    public static void main(String[] args) {
        Duration duration = Duration.between(LocalDateTime.of(2011,11,11,11,11,11),LocalDateTime.now());
        System.out.println(duration);
        System.out.println(duration.getSeconds());
        System.out.println(duration.getNano());
        System.out.println(duration.toDays());
        System.out.println(duration.toHours());
        System.out.println(duration.toMinutes());
        System.out.println(duration.toSeconds());
        System.out.println(duration.toNanos());
        System.out.println(duration.toMillis());

        Haha haha = new Haha();
        haha.sing();
    }


}
